package com.yanqu.road.server.cmd.fellingtrees;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.FellingTreesProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.activity.fellingtrees.FellingTreesMgr;
import com.yanqu.road.server.protocol.GameProtocol;

@Cmd(code = GameProtocol.S_FELLING_TREES_SEE_RANK_EQUIP_FROM_CROSS, desc = "")
public class FellingTreesSeeRankEquipFromCrossCmd extends AbstractCommand {

    private FellingTreesProto.CrossFellingTreesSeeRankEquipReqMsg reqMsg;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        reqMsg = FellingTreesProto.CrossFellingTreesSeeRankEquipReqMsg.parseFrom(packet.getBytes());
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        FellingTreesMgr.seeRankEquip(reqMsg.getActivityId(), reqMsg.getReqServerId(), reqMsg.getReqUserId(), reqMsg.getReq().getUserId());
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
